import request from '@/utils/request'

export function holidayLawsList(query) {
  return request({
    url: '/holidaylaws',
    method: 'get',
    params: query
  })
}

export function dateCalc(query) {
  return request({
    url: '/date/calc',
    method: 'get',
    params: query
  })
}

export function holidayLawsAdd(data) {
  return request({
    url: '/holidaylaw',
    method: 'post',
    data
  })
}

export function holidayLawsDelete(id) {
  return request({
    url: `/holidaylaw/${id}`,
    method: 'delete'
  })
}

export function holidayLawsUpdate(id, data) {
  return request({
    url: `/holidaylaw/${id}`,
    method: 'put',
    data
  })
}
